package com.jason.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单模块
 * </p>
 *
 * @author sj
 * @since 2018-04-25
 */
@ApiModel("菜单模块")
@TableName("sys_permission")
@Data
public class SysMenu implements Serializable {

    @JsonIgnore
    @TableField("id")
    private Long id;

    @TableField("code")
    private String code;

    @TableField("permission_name")
    private String name;

    @TableField("url")
    private String url;

    @TableField("icon")
    private String icon;

    @JsonIgnore
    @TableField("pid")
    private Long pid;

    @TableField(exist = false)
    private List<SysMenu> children;

    @JsonIgnore
    @TableField("sort")
    private Integer sort;

}
